<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
          var i = new String(10);
          var j = String(10);;
          var ref1 = String.constructor;
          var ref2 = i.constructor;
          var str1 = i.toString();
          var str2 = j.toString();
          var str3 = toString(i);
          document.write(`i的数据类型是`+typeof(i)+`,其值是${i}`+"<br>");    
          document.write(`j的数据类型是`+typeof(j)+`,其值是${j}`+"<br>");     
          document.write(`ref1的数据类型是`+typeof(ref1)+`,其值是${ref1}`+"<br>");    
          document.write(`ref2的数据类型是`+typeof(ref2)+`,其值是${ref2}`+"<br>");    
          document.write(`str1的数据类型是`+typeof(str1)+`,其值是${str1}`+"<br>");    
          document.write(`str2的数据类型是`+typeof(str2)+`,其值是${str2}`+"<br>");    
          document.write(`str3的数据类型是`+typeof(str3)+`,其值是${str3}`+"<br>");
          document.write(`str1的长度是：`+i.length+`,str2的长度是：`+j.length);
          //i的数据类型是object,其值是10
          //j的数据类型是string,其值是10
          //ref1的数据类型是function,其值是function Function() { [native code] }
          //ref2的数据类型是function,,其值是function String() { [native code] }
          //str1的数据类型是string,其值是10
          //str2的数据类型是string,其值是10
          //str3的数据类型是string,其值是[object Undefined]
          //str1的长度是：2,str2的长度是2
      </script>      
</body>
</html>